1. Field of the Invention
The present invention generally relates to a method for programming an application function by use of event-driven-type function blocks, and more particularly to a method for programming an application function by use of event-driven-type function blocks wherein a plurality of event-driven-type function blocks each composed of a data processing block and an event processing block are connected in order to generate an application function and wherein merging of signal lines is enabled for efficient programming of the application function. The present invention further relates to a program recording medium in which a program for executing the method is stored.
2. Description of the Related Art
A programming technique using a diagrammatic representation called an xe2x80x9cevent-driven-type function blockxe2x80x9d has become popular. The event-driven-type function block is composed of a function block portion for governing a data flow and a timing block portion for controlling the timing of the data flow. The timing of the data flowxe2x80x94control of which has been difficult for a conventional programming method in which an application function is generated through mere connection of functions blocksxe2x80x94is adjusted by means of timing blocks which are represented in the same manner as are function blocks and are connected properly.
In the case where an application function is generated through establishment of connections between event-driven-type function blocks, there must be developed a technique that enables efficient programming of an application function through realization of a user interface that can be used easily.
Specifications in relation to representation of an application function by use of event-driven-type function blocks are defined as IEC1499 but have not been finalized.
An event-driven-type function block according to the IEC1499 standard has a basic structure as shown in FIG. 19. In response to transmission of an event, an algorithm corresponding to a present status is started. The algorithm performs predetermined processing, while using input variables of a data input. Subsequently, the algorithm sets resultant values as output variables of a data output, and outputs an event indicating completion of the processing. In some cases, internal variables are prepared separately from the input/output variables, and the algorithm performs predetermined processing while using the internal variables.
When an application function is created by use of event-driven-type function blocks as shown in FIG. 19, connections are established between the event sections of the event-driven-type function blocks as well as between the data sections of the event-driven-type function blocks, as shown in FIG. 20.
The application function shown in FIG. 20 performs the following processing in response to an event input from EIN. When a value input from IN at that time is greater than a constant value of 100, correction operation 1 is performed, and a resultant value is input to a subsequent block as data to be post-processed. When the value is less than a constant value of 0, correction operation 2 is performed, and a resultant value is input to the subsequent block as data to be post-processed. When the value is between 0 and 100, correction operation 3 is performed, and a resultant value is input to the subsequent block as data to be post-processed.
The specifications of the event-driven-type function block shown in FIG. 19 have been under study, and a definition has been provided for presence of a group of input variables and a group of output variables. However, the manner for preparing these variable groups has not been defined. In the case where the conventional event-driven-type function blocks shown in FIGS. 19 and 20 are used, there is presumably employed a structure as shown in FIG. 21, in which a variable area is prepared for each of input and output terminals of each event-driven-type function block. In an exemplary case where two event-driven-type function blocks FB1 and FB2 are connected via variable areas as shown in FIG. 21, when transfer of an event occurs in an execution stage, data in an output variable area provided for the output terminal of FB1 is copied to an input variable area provided for the input terminal of FB2. Thus, an application function is realized.
However, studies performed by the present inventors revealed that the technique shown in FIG. 21 causes the following problems. That is, although a direction connection can be established between the event-driven-type function blocks when data are supplied to two or more branches, a direction connection cannot be established between the event-driven-type function blocks when data from two or more lines are merged into a single line. In the latter case, an event-driven-type function block having a selection function must be used.
Specifically, in an exemplary case shown in FIG. 22 where output data from an event-driven-type function block FB1 are input to two event-driven-type function blocks FB2 and FB3, data in the output variable area of the event-driven-type function block FB1 are copied to an input variable area of the event-driven-type function block FB2 and are also copied to an input variable area of the event-driven-type function block FB3. In the above case where data are supplied to branches, the event-driven-type function blocks can be connected with one another through direct connections, because a source-destination relationship can be determined univocally for the data-copying operation.
By contrast, in an exemplary case shown in FIG. 23 where output data from two event-driven-type function blocks FB1 and FB2 are input to a single event-driven-type function block FB3, it cannot be determined whether data in the output variable area of the event-driven-type function block FB1 or data in the output variable area of the event-driven-type function block FB2 are to be copied to an input variable area of the event-driven-type function block FB3. In the above case where data are merged, the event-driven-type function blocks cannot be connected with one another through direct connections, because a source-destination relationship cannot be determined univocally for the data-copying operation.
Moreover, when the technique shown in FIG. 21 is used, an event-driven-type function block having a selection function must be employed in order to select a data set to be transmitted to a subsequent stage. In the example shown in FIG. 20, an event-driven-type function block SEL having a selection function is employed for selecting one of the resultant values of the correction operations 1-3 for transmission to a subsequent stage.
However, when the technique shown in FIG. 21 is used, a user who programs an application function encounters a difficulty in programming, because event-driven-type function blocks cannot be connected for data merging. In the exemplary case shown in FIG. 23, an event-driven-type function block having a selection function must be used even in a simple operation of inputting into the function block FB3 the newer one of a data set output from the function block FB1 and a data set output from the function block FB2. Therefore, programming becomes difficult and time consuming.
An object of the present invention is to provide a method for programming an application function through connection of a plurality of event-driven-type function blocks in which merging of signal lines is enabled for efficient programming of the application function.
Another object of the present invention is to provide a program recording medium in which is stored a program for executing a method for programming an application function through connection of a plurality of event-driven-type function blocks in which merging of signal lines is enabled for efficient programming of the application function.
Still another object of the present invention is to provide an apparatus for programming an application function through connection of a plurality of event-driven-type function blocks in which merging of signal lines is enabled for efficient programming of the application function.
Further object of the present invention is to provide a program recording medium in which is stored a program obtained through execution of a method for programming an application function through connection of a plurality of event-driven-type function blocks in which merging of signal lines is enabled for efficient programming of the application function.
The present invention provides a method for programming an application function through connection of a plurality of event-driven-type function blocks each composed of a data processing block and an event processing block. The method comprises at least a first processing step and a second processing step. When a first data signal line is set in order to establish a connection between first and second event-driven-type function blocks, in the first processing step, a first variable area for data transfer is set for the established connection. In the second processing step, a pointer for pointing to the first variable area is allocated to each of the first and second event-driven-type function blocks so that the first and second event-driven-type function blocks output data to and input data from the first variable area.
The present invention also provides a program recording medium in which is stored a program for executing a method for programming an application function through connection of a plurality of event-driven-type function blocks each composed of a data processing block and an event processing block, wherein the program recording medium stores a program for causing a computer to perform a setting process and an allocation process. When a first data signal line is set in order to establish a connection between first and second event-driven-type function blocks, the setting process sets a first variable area corresponding to the established connection and adapted for data transfer. The allocation process allocates a pointer for pointing to the first variable area to each of the first and second event-driven-type function blocks so that the first and second event-driven-type function blocks output data to and input data from the first variable area.
The present invention further provides an apparatus for programming an application function through connection of a plurality of event-driven-type function blocks each composed of a data processing block and an event processing block, the apparatus comprising a setting section and an allocation section. When a first data signal line is set in order to establish a connection between first and second event-driven-type function blocks, the setting section sets a first variable area for data transfer for the established connection. The allocation section allocates a pointer for pointing to the first variable area to each of the first and second event-driven-type function blocks so that the first and second event-driven-type function blocks output data to and input data from the first variable area.
The present invention further provides a computer-readable recording medium in which is stored an application function programmed through connection of a plurality of event-driven-type function blocks each composed of a data processing block and an event processing block, wherein the application function performs data transfer between first and second event-driven-type function blocks by use of a first variable area provided for a first signal line set between the first and second event-driven-type function blocks, data transfer between a third event-driven-type function block and the first data signal line mutually connecting the first and second event-driven-type function blocks by use of a second variable area provided for a second signal line set between the third event-driven-type function block and the first data signal line mutually connecting the first and second event-driven-type function blocks, and data transfer between the first data signal line mutually connecting the first and second event-driven-type function blocks and a fourth data signal line mutually connecting fourth and fifth event-driven-type function blocks by use of a third variable area provided for the fourth data signal line set between the first signal line mutually connecting the first and second event-driven-type function blocks and the third signal line mutually connecting the fourth and fifth event-driven-type function blocks.